package com.umeng.kaoti5.adapter;

import android.content.Context;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.example.mvplibrary.mvplibrary.adapter.BaseAdapter;
import com.example.mvplibrary.mvplibrary.adapter.BaseViewHolder;
import com.umeng.kaoti5.R;
import com.umeng.kaoti5.data.HighOpinion;

import org.w3c.dom.Text;

import java.util.List;

public class FirstAdapter extends BaseAdapter<HighOpinion.ListBean> {
    public FirstAdapter(List<HighOpinion.ListBean> datas, Context context, int layoutId) {
        super(datas, context, layoutId);
    }

    @Override
    protected void bindData(BaseViewHolder holder, HighOpinion.ListBean listBean, int position) {
        ImageView iv_image = holder.getView(R.id.iv_image);
        TextView tv_name = holder.getView(R.id.tv_name);
        TextView tv_cate = holder.getView(R.id.tv_cate);
        Glide.with(context).load(listBean.getThumb()).into(iv_image);
        tv_name.setText(listBean.getName());
        tv_cate.setText(listBean.getCateStatus().getName());

    }
}
